<%@ include file="/en/jsp/static.jsp" %>

<%
  String NAME = (String) request.getAttribute("NAME");
  String URL = (String) request.getAttribute("URL");
  String tmp = (String)request.getAttribute("ID");
  int ID = 0;
  if (tmp != null && tmp.length() >0)
    ID = Integer.parseInt(tmp);
  tmp = (String) request.getAttribute("SYSTEM");
  int SYSTEM = 0;
  if (sec.isBookmarkAdmin())
  {
    if (tmp!=null && tmp.length() > 0)
      SYSTEM = Integer.parseInt(tmp);
  }
%>

<jsp:include page="/en/jsp/header.jsp" flush="true"/>


<table width="100%" height=26 align=middle border=0 cellpadding=0 cellspacing=0 bgcolor="#f4f4f4" style="font-size:16px;color:#d05000">
<tr><td>
    &nbsp;<img src="<%=BoxStatic.imageDir%>itemball.jpg" width=14 height=15 border=0 align="absmiddle">
    <b><%=boxName%> - Bookmark Edit</b>
</td></tr>
</table>

<hr width=\"100%\" color=#E06000 align=left>

<table width="100%" border=0 cellpadding=0 cellspacing=0>
<tr><td>

  <table width= "100%" border=1 cellspacing=0 cellpadding=1>
    <tr><td>
      <table border=0 width="100%" bgcolor=#e0e0e0 style="font-size:14px">
        <form action="<%=BoxStatic.servletDir%>BookmarkAction" method=post>
          <input type=hidden name=ID value=<%=ID%>>
          <tr><td>
            <b>Name:</b> <input align=right type=text name=NAME size=50 value="<%=NAME%>">
          </td></tr>
          <tr><td>
            <b>URL:</b> <input align=right type=text name=URL size=50 value="<%=URL%>">
          </td></tr>
<%
  if (sec.isBookmarkAdmin())
  {
%>
          <tr><td>
            <input type="radio" name="SYSTEM" value=0 <% if (SYSTEM==0) out.print("checked"); %> >
              Your own bookmark  
            <input type="radio" name="SYSTEM" value=1 <% if (SYSTEM!=0) out.print("checked"); %> >
              System bookmark
          </td></tr>
<%
  }
%>
          <tr><td>
            <input type=submit value=
<%
      if (ID==0)
        out.println("\"Add\" name=SubmitSave");
      else
      {
        out.println("\"Update\" name=SubmitUpdate>");
        out.println("<input type=submit value=\"Delete\" name=SubmitDelete");
      }
%>
            >
            <input type=button value="Cancel" onclick="window.history.go(-1)" >
          </td></tr>
        </form>
      </table>
    </td></tr>
  </table>

</td></tr>
</table>

<hr width=\"100%\" color=#E06000 align=left>

<jsp:include page="/en/jsp/footer.jsp" flush="true"/>
